////
/// Property
/// @group Property
////

//  th-property()
/// Output heading property style.
///
/// @since 0.0.14
///
/// @param {list | string} $heading - A heading map key or list.
/// @param {string} $property-name - (font-size | line-height | margin-top | margin-bottom | breakpoint) A heading property name.
/// @param {number} $breakpoint [false] - A heading list breakpoint.
/// @param {boolean | string} $convert [true] - (true | false | px | em | rem | rel | percent) If returned value should be unit converted or overridden.
/// @param {number} $base-font-size [$th-base-font-size] - Font size used for relative calculations.
///
/// @example scss - Output h1 font size styles.
///   @include th-property-font-size(h1)
/// @example scss - Output h1 font size styles with 768px breakpoint.
///   @include th-property-font-size(
///     $heading: h1,
///     $breakpoint: 768px
///   )
/// @example scss - Output h1 font size styles without unit conversion.
///   @include th-property(
///     $heading: h1,
///     $property-name: font-size,
///     $convert: false
///   )
/// @example scss - Output h1 font size styles and unit override to percent.
///   @include th-property(
///     $heading: h1,
///     $property-name: font-size,
///     $convert: percent
///   )
/// @example scss - Output h1 font size styles with a base font size of 24px.
///   @include th-property(
///     $heading: h1,
///     $property-name: font-size,
///     $base-font-size: 24px
///   )

@mixin th-property(
  $property-name,
  $heading,
  $breakpoint: false,
  $convert: true,
  $base-font-size: $th-base-font-size
){
  @if font-size != $property-name {
    $base-font-size: _th-property-base(
      $heading,
      $breakpoint,
      $base-font-size
    );
  }
  #{$property-name}: th-property(
    $property-name: $property-name,
    $heading: $heading,
    $breakpoint: $breakpoint,
    $convert: $convert,
    $base-font-size: $base-font-size
  );
}

//  th-p()
/// Alias to th-property() mixin.
///
/// @since 0.0.15

@mixin th-p(
  $property-name,
  $heading,
  $breakpoint: false,
  $convert: true,
  $base-font-size: $th-base-font-size
){
  @include th-property(
    $property-name: $property-name,
    $heading: $heading,
    $breakpoint: $breakpoint,
    $convert: $convert,
    $base-font-size: $base-font-size
  );
}